package likong.bibliothek.pages.status;

import likong.bibliothek.obj.Autor;
import likong.bibliothek.obj.BuchStatus;
import likong.bibliothek.obj.Spender;

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.WebPage;
import org.hibernate.Session;


import Persondata.Person;
import Persondata.PersonWeb;
import db.HibernateHelper;

public class StatusLoeschen extends StatusAbstract{
	public StatusLoeschen(PageParameters params) {
		Session session = HibernateHelper.getSessionFactory().getCurrentSession();
		session.beginTransaction();
		session.get(BuchStatus.class, params.getInt("statusID"));
		session.delete(session.get(BuchStatus.class, params.getInt("statusID")));
		session.getTransaction().commit();
		this.setResponsePage(StatusWeb.class, params);
		
	}
}
